import siteinfo from '@/siteinfo.js'

export function getSiteInfo() {
  let _siteinfo = {}
  try {
    const res = tt.getExtConfigSync()
    if (res.extConfig.platform_appid) {
      _siteinfo = res.extConfig
      console.log('第三方服务商', res)
    }
    else {
      // 挂载配置项
      _siteinfo = siteinfo
      console.log('本地部署', siteinfo)
    }
  }
  catch (err) {
    console.log('执行出错', err)
  }
  return _siteinfo
}
